package com.ss.android.action;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import com.bytedance.common.utility.collection.WeakHandler.Callback;
import com.bytedance.common.utility.collection.WeakHandler;
import com.ss.android.model.ItemActionV3;

public final class BatchActionHelper implements Callback {
    public Handler a;
    public Context b;

    public BatchActionHelper(Context arg2) {

        this.a = new WeakHandler(((Callback)this));
        this.b = arg2.getApplicationContext();
    }

    public final void handleMsg(Message message) {
        int v1 = 0;
        switch(message.what) {
            case 1005: {
                v1 = 1;
            break;
            }
            case 1006: {
                v1 = 0;
            }

            Object v0 = (message.obj instanceof ItemActionV3) ? message.obj : null;
            if(v0 == null) {
                return;
            }

            if(!((ItemActionV3)v0).a()) {
                return;
            }

            if(v1 == 0) {
                return;
            }

            if(v0 == null) {
                return;
            }

            if(!((ItemActionV3)v0).a()) {
                return;
            }

            com.ss.android.action.bb.a();
            com.ss.android.action.bb.b(((ItemActionV3)v0));
            break;
        }
    }
}

